
public class Cylinder
{
    private double _r;
    private double _h;


    Public Cylinder(double r,double h)
    {
       this._r = r;
       this._h = h;
    }
    public double getArea()
    {
        double tmp1 = 2*_r*3.14;//底面积
        double tmp2 = tmp1 * _h;//侧面积
        double tmp3 = 3.14*_r*_r;//综合
        double tmp4 = 2*tmp3 + tmp2;
        return tmp4;
    }
    public double getVolume()
    {
        double tmp1 = _r*_r*3.14;//底面积
        double tmp2 = tmp1 * _h;
        return tmp2;
    }
}
 
